#include "stdio.h"
main()
{
	double a[800],tot,n;
	int i,j;
	a[0]=0;
	for (i=1;a[i]<=521000;++i)
	{
		a[i]=a[i-1]+1.0/(i+1)*100000;
	}
	
	scanf("%lf\n",&n);
	while (n!=0)
	{	
		i=1;
		n=n*100000;
		while ((n-a[i])>0.00000001) ++i;
		printf("%d card(s)\n",i);
		scanf("%lf\n",&n);
	}
		
}
